<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<%@ include file="/common/hallimport.jsp" %>
<link href="${ctx}/css/hall.css" rel="stylesheet">
<link href="${ctx}/css/web_style.css" rel="stylesheet">
<script src="${ctx}/js/web/tab.js"></script>
<script src="${ctx}/js/layer/layer.js"></script>
<script src="${ctx}/js/uct/date.js"></script>
<title>竞价统计-竞价大厅</title>
</head>
<body>
<%@ include file="/common/halltop.jsp" %>
<div  id="content" class="fixedw">

   <!-- 公告 -->
    <%@ include file="jjdt-top.jsp" %>
    
  <div class="main">
  <div class="">
  <h5 class="con_title"><span></span> 竞价统计  </h5>
	<!-- 搜索开始 -->
     <div class="searchForm">
     <form id="historyList_form">
		<input type="hidden" name="page"  value="1"/>
		<input type="hidden" name="rows"  value="10" id="rows"/>
		<input type="hidden" name="methodKey"  value="itemHistoryList"/>
		<input type="hidden" name="tag"  value="table" id="tag"/>
		<input type="hidden" name="direction"  value="T">
		<select name="bidMode">
			<option value="">--竞价方式--</option>
			<option value="1">正向多次竞价</option>
			<option value="3">正向一次报价</option>
			<option value="5">正向份额报价</option>
			<option value="7">荷兰式竞价</option>
		</select>
		<input type="text" name="itemName"  value=""  tip="标的名称" placeholder="标的名称" /><a class="searchbtn" iconCls="icon-search" onclick="historyListSearch();">查询</a>
	</form>
	</div>
	<!-- 搜索结束 -->
	<div class="flcon" id="flcon">
	
      
	 <table id="historyList_table" class="tb_list" cellspacing="1" cellpadding="0">
		<tr class='active' id="title2" >
			<th>标的名称</th>
			<th>竞价方式</th>
			<th>起始价格 （万元）</th>
			<th>报价次数</th>
			<th>最高报价（万元）</th>
			<th>溢价率（%）</th>
			<th>开始时间</th>	
			<th>结束时间</th>
		</tr>
	</table>
	</div>
	<div id="historyList_page" class="web_pages"></div>
	<script type="text/template" id="historyList_table_html">
	<? for ( var i = 0; i < rows.length; i++) {?>
		<tr id=item_<?=rows[i].itemId?>>
			<td class="td_left pl5px" title="<?=rows[i].itemName?>"><?=strUtil.subStr(rows[i].itemName,20)?></td>
			<td><?=bidModeText(rows[i].bidMode)?></td>
			<td class="td_right">&yen;<?=rows[i].firstValue?></td>
			<td class="td_right"><a href="javascript:void(0)" onclick="itemInfoList('<?=rows[i].itemId?>','<?=rows[i].itemName?>')"><?=rows[i].bidTimes?></a></td>
			<td class="td_right">&yen;<?=rows[i].lastValue?></td>
			<td class="td_right"><?=(rows[i].yjl*100).toFixed(2)?>%</td>
			<td><?=rows[i].openTime?></td>
			<td><?=rows[i].closeTime?></td>
		</tr>
	<?}?>  		
	</script>
</div>
<div class="right">
	
   </div>
 
  	<div id="itemInfoList_div" style="display:none;">
	  <table id="itemInfoList_table" class="tb_list" cellspacing="1" cellpadding="0">
		</table>
		<script type="text/template" id="itemInfoList_html">
			<tr class='active' id="title2" >
		        <th>报价人</th>
		        <th>报价价格</th>
		        <th>报价时间</th>
			</tr>
	<? for ( var i = 0; i < rows.length; i++) {?>
		<tr id=item_<?=rows[i].itemId?>>
			<td class="td_right"><?=rows[i].userName?></td>
			<td class="td_right">&yen;<?=rows[i].bidValue?></td>
			<td class="td_center"><?=rows[i].bidTime.substring(0,19)?></td>
		</tr>
	<?}?> 
	</script>
	</div>
	
	
	 </div>
</div>
<%@ include file="/common/hallbottom.jsp" %>
</body>
</html>

<script>
var itermIds = "";
//打开查看页面
function gotohall(itemId){
	//alert(sessionId);
	window.location.href= ctx+spaceDomain+"hall/item/"+itemId;
}

//查询提交
function historyListSearch(){
	searchSubmit("hall","historyList");
}

function itemInfoList(itemId,itemName){
	getItemInfoList(itemId);
		layer.open({
		   type: 1,
		   title: "标的【"+itemName+"】报价列表",
		   closeBtn: 1,
		   area: ['600px', '420px'],
		   shadeClose: true,
		   content: $('#itemInfoList_div')
		});
}
//初始化加载
$(function(){
	//加载分页列表
	historyListSearch();
});

</script>

